home *** CD-ROM | disk | FTP | other *** search
-
- hi there,
-
- just seen swapping routine in a PC Visual Basic manual at work and
- wondered if anyone else knew of the routine.....
-
- NORMAL SWAP Cool Swap
- ----------- ---------
-
- temp = a a = a xor b
- b = a b = b xor a
- a = temp a = a xor b
-
-
- This new routine actually gets rid of the 3rd variable and 'could' reduce
- the processing time?? I problem is is that it can only work on numbers NOT
- strings - or could it? - who knows, who cares!
-
-
-
-
-
-